<?php

// +---------------------------------------------+
// |     Copyright  2010 - 2018 InterPhoto       |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+


include('includes/InterPhoto.Core.php');


$aboutus = GetContent(1);

$smarty = new InterPhoto;

$pagenav = '<a href="'.GetUrl('index.php').'">'.$langs['home'].'</a> '.$langs['nav'].' <a href="'.GetUrl('about.php').'">'.$aboutus['title'].'</a>';


$getimages = $DB->query("SELECT i.imageid, i.path, i.filename, i.title FROM " . TABLE_PREFIX . "images i LEFT JOIN  " . TABLE_PREFIX . "categories c ON (c.categoryid = i.categoryid) WHERE (i.usergroupids = 'all' OR i.usergroupids LIKE '%(".$userinfo['groupid'].")%') AND i.actived = 1 AND c.actived = 1 ORDER BY i.imageid DESC LIMIT 10");

$images = $DB->getrows($getimages);

$smarty->assign('images', $images);
$smarty->assign('aboutus', $aboutus);

if($aboutus['keywords']){
	$smarty->assign('metakeywords', $aboutus['keywords'] . ','.$mainsettings['siteKeywords']);
	$smarty->assign('metadescription', $aboutus['keywords'] . ',' .$mainsettings['siteMeta']);
}

//Always needing
$smarty->assign('pagenav', $pagenav);
$smarty->assign('userinfo', $userinfo);
$smarty->assign('pagetitle', $aboutus['title'] . ' - ' .$mainsettings['siteTitle']);

$smarty->interPlay('about.tpl');

?>